package com.zhiwang.planet.widget

import android.content.Context
import android.view.LayoutInflater
import android.widget.FrameLayout
import android.widget.TextView
import com.zhiwang.planet.R

class ItemView(context: Context?) : FrameLayout(context) {

    companion object {
        var layoutInflater: LayoutInflater? =null
    }

    fun setDiamondProfit(some: String?) {
        findViewById<TextView>(R.id.diamond_profit).text = some
    }

    init {
        if (layoutInflater == null)
            layoutInflater = LayoutInflater.from(context)
        val itemView = layoutInflater?.inflate(R.layout.item_layout, null)
        addView(itemView)
    }
}
